#set(title='订单管理',menu='order',statusMap={'1':'待买家付款','2':'待发货','3':'待买家确认收货','4':'交易完成','5':'交易关闭'})
#@user_layout()
#define user_main()
	 <h1 class="page-header">#(title)</h1>
     <div class="table-responsive">
            <table class="table table-striped ">
              <thead>
                <tr>
                  <th>序号</th>
                  <th>用户名称</th>
                  <th>订单编号</th>
                  <th>订单金额</th>
                  <th>下单时间</th>
                  <th>订单状态</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
               #for(x : page.getList())
	             	<tr>
	                  <td>#(for.index+1)</td>
	                  <td>#(x.name)</td>
	                  <td>#(x.id)</td>
	                  <td>#(x.total)</td>
	                  <td>#(x.createTime)</td>
	                  <td>#(statusMap[x.status+''])</td>
	                  <td>
	                  		<a type="button" class="btn btn-info" href="#(ctx)/order/detail/#(x.id)">详情</a>
	                  	#if(x.status == 1) 
	                  		<button type="button" class="btn btn-info" id="payBtn-#(x.id)">付款</button>
	                  	#elseif(x.status == 3) 
	                  		<button type="button" class="btn btn-info" id="recBtn-#(x.id)">确认收货</button>
	                  	#elseif(x.status == 4 && x.commented == 0) 
	                  		<a type="button" class="btn btn-info" href="#(ctx)/comments/#(x.id)">评价</a>
	                  	#end
	                  </td>
	                </tr>
                #end
              </tbody>
            </table>
          </div>
#end
